package com.fuchenyang.consumer.controller;

import com.fuchenyang.common.util.JsonResult;
import com.fuchenyang.consumer.Service.ConsumerService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/consumer_basic")
public class ConsumerBasicController {
    @Resource(name = "consumerServiceImpl")
    private ConsumerService service;

    @GetMapping("/a")
    public JsonResult a() {
        return service.a();
    }

    @GetMapping("/b/{name}")
    public JsonResult b(@PathVariable("name") String name) {
        return service.b(name);
    }
}